package cn.csdj.sism.service.impl;

import cn.csdj.sism.dao.MenuMapper;
import cn.csdj.sism.pojo.Menu;
import cn.csdj.sism.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * MenuServiceImpl接口实现类
 * @author 谭世豪
 * 2023/4/10
 */
@Service
public class MenuServiceImpl implements MenuService {
    @Autowired
    private MenuMapper menuMapper;
    @Override
    public int insert(Menu menu) {
        return menuMapper.insert(menu);
    }

    @Override
    public int deleteById(Integer id) {
        return menuMapper.deleteById(id);
    }

    @Override
    public List<Menu> selectAll() {
        return menuMapper.selectList(null);
    }

    @Override
    public Menu selectById(Integer id) {
        return menuMapper.selectById(id);
    }

    @Override
    public int update(Menu menu) {
        return menuMapper.updateById(menu);
    }
}
